Skip to content

Log error if we attempt to cache a "bad" value#6794

Merged
labkey-adam merged 6 commits intodevelopfrom
fb_throw_on_bad_cache_values
Jun 28, 2025
Merged

Log error if we attempt to cache a "bad" value#6794
labkey-adam merged 6 commits intodevelopfrom
fb_throw_on_bad_cache_values

Conversation

@labkey-adam
Copy link
Contributor

@labkey-adam labkey-adam commented Jun 25, 2025

Rationale

We don't want cached objects holding onto Container or User objects: https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=53058

We've cleared most (maybe all?) cases, so it's time to crank up the logging to flush out any hiding stragglers. This PR also logs errors when we detect a mutable collection or array getting cached; for a long time, we've logged these as warnings.

Related Pull Requests

@labkey-adam labkey-adam changed the title Throw if we attempt to cache a "bad" value Log error if we attempt to cache a "bad" value Jun 25, 2025
@labkey-adam labkey-adam marked this pull request as ready for review June 27, 2025 00:48
@labkey-adam labkey-adam self-assigned this Jun 27, 2025
@labkey-adam
Copy link
Contributor Author

Existing automated tests have flagged the classes I changed and these same tests validate the changes I made. I don't see a value in manual or further automated tests here or in the companion PR.

@labkey-adam labkey-adam merged commit e873689 into develop Jun 28, 2025
9 checks passed
@labkey-adam labkey-adam deleted the fb_throw_on_bad_cache_values branch June 28, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants